﻿// -----------------------------------------------------------------------
// <copyright file="Candidate.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace SoftServe.HrManager.Models
{
    using System;
    using System.Collections.Generic;
    using SoftServe.HrManager.Abstractions;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class Candidate: ISkillEnumerator, IEquatable<Candidate>, IPerson
    {
        public string Name { get; set; }

        public string Phone { get; set; }

        public DateTime BDate { get; set; }


        #region ISkillEnumerator implementation

        public IEnumerable<eSkillName> Skills { get; set; }
        
        #endregion

        #region IEquatable<Candidate> implementation

        public bool Equals(Candidate other)
        {
            
            if (other != null)
            {
                return string.Compare(other.Phone, Phone) == 0
                    && string.Compare(other.Name, Name, true) == 0;
            }

            return false;
        }

        #endregion
    }
}
